package stack.be.touch.dto;

import android.provider.BaseColumns;

public class SiteDTO {
	
	public static final String KEY_ENDPOINT = BaseColumns._ID;
	public static final String KEY_NAME = "name";
	public static final String KEY_UID = "uid";
	public static final String KEY_REPUTATION = "reputation";
	public static final String KEY_POS = "position";
	public static final String KEY_CHECKED = "checked";
	public static final String KEY_UNAME = "user_name";
	
	public static final String TABLE_NAME = "sites";
	
	private String endpoint = null;
	private String name = null;
	private long userID = 0;
	private int position = 0;
	private String uname = null;
	private int isChecked = 0;
	
//	public MySite(String name, String endpoint, boolean isChecked) {
//		super();
//		this.name = name;
//		this.endpoint = endpoint;
//		this.isChecked = isChecked;
//	}
	
	public SiteDTO(String name, String endpoint, int position, int isChecked) {
		super();
		this.endpoint = endpoint;
		this.name = name;
		this.position = position;
		this.isChecked = isChecked;
	}



	public SiteDTO(String endpoint, String name, long userID, int position,
			String uname) {
		super();
		this.endpoint = endpoint;
		this.name = name;
		this.userID = userID;
		this.position = position;
		this.uname = uname;
	}

	public String getEndpoint() {
		return endpoint;
	}

	public String getName() {
		return name;
	}

	public long getUserID() {
		return userID;
	}

	public int getPosition() {
		return position;
	}

	public String getUname() {
		return uname;
	}
	
	public void setEndpoint(String endpoint) {
		this.endpoint = endpoint;
	}

	public int isChecked() {
		return isChecked;
	}


	public void setChecked(int isChecked) {
		this.isChecked = isChecked;
	}


	public void setName(String name) {
		this.name = name;
	}

	public void setUserID(long userID) {
		this.userID = userID;
	}

	public void setPosition(int position) {
		this.position = position;
	}

	public void setUname(String uname) {
		this.uname = uname;
	}

	public void toggleChecked() {
		this.isChecked = (isChecked == 1) ? 0:1;
	}
	
}
